package com.pisolution.scheduler.datasource.workflow;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

/**
 * 工作流数据实体.
 *
 * @author sora
 * @version 0.1.0
 */
@TableName(value = "workflow")
public class Workflow {
    // -------------------------------------------------------------------------------------------------
    //  数据单元 (基础信息)
    // -------------------------------------------------------------------------------------------------

    /** 工作流标识. */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /** 工作流名称. */
    @TableField(value = "name")
    private String name;

    /** 工作流描述. */
    @TableField(value = "description")
    private String description;

    /** 工作流版本. */
    @TableField(value = "version")
    private int version;

    /** 工作流完整内容 json格式. */
    @TableField(value = "content")
    private String content;

    /** 创建时间. */
    @TableField(value = "create_time")
    private Date createTime;

    /** 更新时间. */
    @TableField(value = "update_time")
    private Date updateTime;

    // -------------------------------------------------------------------------------------------------
    //  数据单元 (关联信息)
    // -------------------------------------------------------------------------------------------------

    /** 所属项目标识. */
    @TableField(value = "project_id")
    private Integer projectId;

    // -------------------------------------------------------------------------------------------------
    //  属性访问
    // -------------------------------------------------------------------------------------------------

    public Integer getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public int getVersion() {
        return this.version;
    }

    public String getContent() {
        return this.content;
    }

    public Integer getProjectId() {
        return this.projectId;
    }
}
